function isPalindrome(str) {
    const originalStr = str.toLowerCase().replace(/[^a-zA-Z0-9]/g, ''); 
    return originalStr === reversedStr;
  }
  const testString1 = 'abccba';
  const testString2 = 'Hello World';
  const testString3 = 'A man, a plan, a canal, Panama!';
  console.log(`${testString1} 是否为回文字符串：${isPalindrome(testString1)}`);
  console.log(`${testString2} 是否为回文字符串：${isPalindrome(testString2)}`);
  console.log(`${testString3} 是否为回文字符串：${isPalindrome(testString3)}`);